| Fully Qualified Name: | CodeIgniter\HTTP\Message |
An HTTP message
| Name | Description | Defined By |
|---|---|---|
| appendBody() | Appends data to the body of the current message. | Message |
| appendHeader() | Adds an additional header value to any headers that accept multiple values (i.e. are an array or implement ArrayAccess) | Message |
| getBody() | Returns the Message's body. | Message |
| getHeader() | Returns a single header object. If multiple headers with the same name exist, then will return an array of header objects. | Message |
| getHeaderLine() | Retrieves a comma-separated string of the values for a single header. | Message |
| getHeaders() | Returns an array containing all headers. | Message |
| getProtocolVersion() | Returns the HTTP Protocol Version. | Message |
| hasHeader() | Determines whether a header exists. | Message |
| populateHeaders() | Populates the $headers array with any headers the getServer knows about. | Message |
| prependHeader() | Adds an additional header value to any headers that accept multiple values (i.e. are an array or implement ArrayAccess) | Message |
| removeHeader() | Removes a header from the list of headers we track. | Message |
| setBody() | Sets the body of the current message. | Message |
| setHeader() | Sets a header and it's value. | Message |
| setProtocolVersion() | Sets the HTTP protocol version. | Message |
Appends data to the body of the current message.
| Parameter Name | Type | Description |
|---|---|---|
| $data | ||
| $data |
Returns: \Message|\Response
Adds an additional header value to any headers that accept multiple values (i.e. are an array or implement ArrayAccess)
| Parameter Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | string |
Returns: \Message
Returns the Message's body.
Returns: mixed
Returns a single header object. If multiple headers with the same name exist, then will return an array of header objects.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string |
Returns: array|\CodeIgniter\HTTP\Header
Retrieves a comma-separated string of the values for a single header.
This method returns all of the header values of the given case-insensitive header name as a string concatenated together using a comma.
NOTE: Not all header values may be appropriately represented using comma concatenation. For such headers, use getHeader() instead and supply your own delimiter when concatenating.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string |
Returns: string
Returns an array containing all headers.
Returns: array An array of the request headers
Returns the HTTP Protocol Version.
Returns: string
Determines whether a header exists.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string |
Returns: bool
Populates the $headers array with any headers the getServer knows about.
Returns:
Adds an additional header value to any headers that accept multiple values (i.e. are an array or implement ArrayAccess)
| Parameter Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | string |
Returns: \Message
Removes a header from the list of headers we track.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string |
Returns: \Message
Sets the body of the current message.
| Parameter Name | Type | Description |
|---|---|---|
| $data | mixed |
Returns: \Message|\Response
Sets a header and it's value.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | array|null|string |
Returns: \Message|\Response
Sets the HTTP protocol version.
| Parameter Name | Type | Description |
|---|---|---|
| $version | string |
Returns: \Message